import request from '@/utils/request'

// 获取售后原因列表
export function pageAfterSaleReason(query) {
  return request({
    url: '/order/afterSaleReason/paging',
    method: 'get',
    params: query
  })
}

// 上移售后原因
export function upSortNo(reason) {
  return request({
    url: '/order/afterSaleReason/upSortNo',
    method: 'post',
    params: reason
  })
}

// 下移售后原因
export function downSortNo(reason) {
  return request({
    url: '/order/afterSaleReason/downSortNo',
    method: 'post',
    params: reason
  })
}

// 删除售后原因
export function deleteAfterSaleReason(reasonId) {
  return request({
    url: '/order/afterSaleReason/delete',
    method: 'post',
    params: { reasonId }
  })
}

// 保存售后原因
export function saveAfterSaleReason(afterSale) {
  return request({
    url: '/order/afterSaleReason/save',
    method: 'post',
    data: afterSale
  })
}

// 售后原因列表
export function listAfterSaleReason(afterSaleReason) {
  return request({
    url: '/order/afterSaleReason/listAfterSaleReason',
    method: 'get',
    params: afterSaleReason
  })
}
